package Practice11;

import java.util.LinkedList;

public class LinkedListDemo {
    public static void main(String[] args) {
        LinkedList<String> link = new LinkedList<String>();
        link.add("abc1");
        link.add("abc2");
        link.add("abc3");
        link.add("abc4");
        System.out.println(link);
        System.out.println(link.getFirst());
        System.out.println(link.getLast());
        System.out.println(link.removeFirst());
        System.out.println(link);
        while (!link.isEmpty()){
            System.out.println(link.pop());
        }
    }
}
